import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('@/views/Home')
const ProjectList = () => import('@/views/project/ProjectList')
const ProjectDesc = () => import('@/views/project/ProjectDesc')
const InterfaceList = () => import('@/views/interface/InterfaceList')
const InterfaceDesc = () => import('@/views/interface/InterfaceDesc')
const Notice = () => import('@/views/Notice')
const InformationList = () => import('@/views/information/InformationList')
const BlogList = () => import('@/views/blog/blogList')
const BlogDesc = () => import('@/views/blog/blogDesc')
const ExampleList = () => import('@/views/example/ExampleList')
const DocumentList = () => import('@/views/document/DocumentList')

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Home
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/projectList',
    component: ProjectList
  },
  {
    path: '/projectList/:title',
    component: ProjectDesc
  },
  {
    path: '/interfaceList',
    component: InterfaceList
  },
  {
    path: '/interfaceList/:title',
    component: InterfaceDesc
  },
  {
    path: '/notice',
    component: Notice
  },
  {
    path: '/informationList',
    component: InformationList
  },
  {
    path: '/blogList',
    component: BlogList
  },
  {
    path: '/blogList/:title',
    component: BlogDesc
  },
  {
    path: '/exampleList',
    component: ExampleList
  },
  {
    path: '/documentList',
    component: DocumentList
  }
]

const router = new VueRouter({
  routes,
  mode: 'history',
  linkActiveClass: 'active'
})

export default router
